package helper;

import beans.Account;
import beans.ClassBean;
import java.util.List;

public class UtilFunction {

    public boolean studentOutClass(List<Account> listStudying, String acc_id) {
        try {
            int i = 0;
            for (Account acc : listStudying) {
                if (!acc.getAcc_id().equals(acc_id)) {
                    i++;
                }
            }
            if (i == listStudying.size()) {
                return true;
            }
            return false;
        } catch (Exception e) {
            return false;
        }
    }
    
    public boolean classOutStudent(List<ClassBean> listStudying, String class_id) {
        try {
            int i = 0;
            for (ClassBean classbean : listStudying) {
                if (!classbean.getClass_id().equals(class_id)) {
                    i++;
                }
            }
            if (i == listStudying.size()) {
                return true;
            }
            return false;
        } catch (Exception e) {
            return false;
        }
    }
}
